Skip to content

Add samsungtv zeroconf discovery#47715

Closed
chemelli74 wants to merge 3 commits into
home-assistant:devfrom
chemelli74:chemelli74-samsungtv
Closed

Add samsungtv zeroconf discovery#47715
chemelli74 wants to merge 3 commits into
home-assistant:devfrom
chemelli74:chemelli74-samsungtv

Conversation

@chemelli74
Copy link
Copy Markdown
Contributor

Proposed change

Add samsungtv zeroconf discovery from @escoand (see initial PR #35773)

Code confirmed to be working for me and @pergolafabio.

Just need a fixed/reserved ip.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

}
},
"abort": {
"already_in_progress": "Samsung TV configuration is already in progress.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

@chemelli74 chemelli74 Mar 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome @escoand !

I would love if you would finalize it, after all is your work ;-)

self._title = self._name

result = await self.hass.async_add_executor_job(self._try_connect)
await self._abort_if_already_configured()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can only call this if you have set a unique ID. But that's not the case when the user instantiates this flow at this point.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

await self._abort_if_already_configured()

await self.hass.async_add_executor_job(self._try_connect)
await self._get_and_check_device_info()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you set the unique ID after you get the device info?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unique id call added

@chemelli74
Copy link
Copy Markdown
Contributor Author

I had a long time mess on my core fork.
So I finally took the time to delete and recreate a clean one.

Seems I cannot anymore "claim" this PR.
If this is the case, should I close this one and create a new one ?

Sorry for the trouble :-(

Simone

@chemelli74
Copy link
Copy Markdown
Contributor Author

Here the final code: chemelli74:chemelli74-samsungtv

Simone

@balloob
Copy link
Copy Markdown
Member

balloob commented Mar 17, 2021

Open a new PR and include a link to this PR in the PR description. We can't recover it either.

@balloob balloob closed this Mar 17, 2021
@balloob
Copy link
Copy Markdown
Member

balloob commented Mar 17, 2021

Tag me when you open the PR so I can finish reviewing.

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

4 participants